/**
 * @description: 资源监控
 */

import type { CommonAPI } from '../types/all'
import { defHttp } from '../http'

/** 资源概览 */
export const getManageMetricOverviewApi: CommonAPI<
  '/v1/manage/metric/overview',
  'get'
> = params => defHttp.get(`/v1/manage/metric/overview`, { params })

/** 节点监控 */
export const postManageMetricPhysicalNodesApi: CommonAPI<
  '/v1/manage/metric/physical-nodes',
  'post'
> = data => defHttp.post(`/v1/manage/metric/physical-nodes`, { data })

/** 网络监控 */
export const getManageMetricRegionsNetworkApi: CommonAPI<
  '/v1/manage/metric/regions-network',
  'get'
> = params => defHttp.get(`/v1/manage/metric/regions-network`, { params })

/** 库存概览 */
export const getIpInventoryOverviewApi: CommonAPI<
  '/v1/ip/inventory_overview',
  'get'
> = params => defHttp.get(`/v1/ip/inventory_overview`, { params })

/**
 * @description: 统计数据
 */

/** 应用的云计算资源汇总 */
export const getStatisticAppComputeApi: CommonAPI<
  '/v1/statistic/app/compute',
  'get'
> = params => defHttp.get(`/v1/statistic/app/compute`, { params })

/** 区域下的汇总统计 */
export const getStatisticRegionApi: CommonAPI<
  '/v1/statistic/region',
  'get'
> = params => defHttp.get(`/v1/statistic/region`, { params })
